//
//  JWTAlipayChargeVipViewController.m
//  JWT
//
//  Created by ndm on 17/2/12.
//  Copyright © 2017年 com.jwtsoft. All rights reserved.
//

#import "JWTAlipayChargeVipViewController.h"
#import "JWTAlipayChargeView.h"


@interface JWTAlipayChargeVipViewController ()

@property (nonatomic,strong) UIScrollView *scrollView;

@property (nonatomic,strong) JWTAlipayChargeView *alipyChargeView;

@end

@implementation JWTAlipayChargeVipViewController

-(instancetype)init{
    self = [super init];
    if (self) {
        
    }
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self initWithNavTitle:@"会员充值"];
    
    [self initWithScrollView];
}

-(void) initWithScrollView{
    if (_scrollView == nil) {
        _scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(self.view.left, 0, UISCREEN_WIDTH, UISCREEN_HEIGHT-getNAVI_TOP_HEIGHT())];
        _scrollView.scrollEnabled = YES;
        _scrollView.backgroundColor = RGB(212, 212, 212);
        [self.view addSubview:_scrollView];
        
        _alipyChargeView  = [[JWTAlipayChargeView alloc] init];
        _alipyChargeView.backgroundColor = RGB(212, 212, 212);
        [_scrollView addSubview:_alipyChargeView];
        
        _scrollView.contentSize = CGSizeMake(UISCREEN_WIDTH, _alipyChargeView.bottom+Cell_Margin);
        WS(weakSelf);
        _alipyChargeView.getCardTypeViewHeight = ^(JWTAlipayChargeView *view){
            weakSelf.scrollView.contentSize = CGSizeMake(UISCREEN_WIDTH, view.bottom+Cell_Margin);
        };
    }
}

@end
